#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : xuexiaohua
# @time    : 2025/8/20 18:25
# @function: the script is used to do something.
# @version :
import yaml

from wework.utils.LogUtils import logger


class YamlUtils:

    @classmethod
    def get_yaml_data(cls, file_path):
        '''
        读取yaml文件
        :param file_path: yaml文件路径
        :return:
        '''
        with open(file_path, "r", encoding="utf-8") as f:
            datas = yaml.safe_load(f)
            logger.info(f"yaml文件读取的配置数据为：{datas}")
        return datas
